/**
 * vux业务派遣
 */
import storage from './../utils/storage'
import moment from 'moment'
import util from './../utils/utils'
export default {
  saveUserInfo(state, userInfo) {
    state.userInfo = userInfo
    storage.setItem('userInfo', userInfo)
  },
  saveUserMenu(state, userMenu) {
    state.userMenu = userMenu
    storage.setItem('userMenu', userMenu)
  },
  saveUserAction(state, userAction) {
    state.userAction = userAction
    storage.setItem('userAction', userAction)
  },
  savenotifyCount(state, count) {
    state.notifyCount = count
    storage.setItem('notifyCount', count)
  },
  /** 保存消息 */
  saveUserMessage(state, data) {
    data.date = moment().format('LTS')
    state.userMessage.push(data)
    storage.setItem('userMessage', state.userMessage)
  },
  updatePushArr(state, data) {
    state.onlnLst = data
    storage.setItem('onlnLst', data)
  },
  updatePushLog(state, data) {
    state.allLogList = data
    storage.setItem('allLogList', data)
  },
  set_router: (state, RouterList) => {
    state.RouterList = RouterList
  },
}
